package oa.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import oa.entity.Employee;

public interface EmployeeMapper {
	Employee fetchByUser(@Param("nr") String nr,@Param("password") String password);
	void updatePassword(@Param("password") String password, @Param("id") int id);
	@Select("SELECT employee.*,department.name departmentName FROM employee JOIN department ON employee.departmentid=department.id")
	List<Employee> getAll();
	@Select("SELECT employee.*,department.name departmentName FROM employee JOIN department ON employee.departmentid=department.id where employee.id=#{id}")
	Employee fetchByid(int id);
	void addEmployee(Employee employee);
	void updateEmployee(Employee employee);
	@Select("SELECT employee.* FROM employee ")
	List<Employee> getAllztree();
}	
